<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <ui:page binding="#{disenoBalance.page1}" id="page1">
            <ui:html binding="#{disenoBalance.html1}" id="html1">
                <ui:head binding="#{disenoBalance.head1}" id="head1">
                    <ui:link binding="#{disenoBalance.link1}" id="link1" url="/resources/stylesheet.css"/>
                </ui:head>
                <ui:body binding="#{disenoBalance.body1}" id="body1" style="-rave-layout: grid">
                    <ui:form binding="#{disenoBalance.form1}" id="form1" virtualFormsConfig="guardar | gridPanel1:txtCodigo gridPanel1:dropDownProducto gridPanel1:dropDownTipoSolic gridPanel1:dropDownSublinea gridPanel1:radioButtonGroup1 | btnGuardar groupPanel2:layoutPanel1:gridPanel2:btnCancelar gridPanel1:dropDownProducto gridPanel1:dropDownTipoSolic gridPanel1:dropDownSublinea gridPanel1:radioButtonGroup1 , virtualForm2 | table1:tableRowGroup1:tableColumn6:checkbox1 hiddenField1 | groupPanel2:table1:groupPanel1:btnActivarDesc groupPanel2:table1:btnEliminar hiddenField1 groupPanel2:table1:groupPanel1:btnBuscar groupPanel2:table1:tableRowGroup1:tableColumn7:hyperlink1 , virtualForm3 | table1:tableRowGroup1:tableColumn6:checkbox1 gridPanel1:dropDownProducto gridPanel1:dropDownSublinea gridPanel1:dropDownTipoSolic gridPanel1:txtCodigo gridPanel1:radioButtonGroup1 | table1:tableRowGroup1:tableColumn6:checkbox1 groupPanel2:table1:groupPanel1:btnModificar gridPanel1:txtCodigo">
                        <ui:label binding="#{disenoBalance.label1}" id="label1" style="position: absolute; left: 120px; top: 48px" text="Crear Diseño de Estado Financiero"/>
                        <ui:button action="#{disenoBalance.btnCerrar_action}" binding="#{disenoBalance.btnCerrar}" id="btnCerrar" immediate="true" mini="true"
                            primary="true" style="left: 119px; top: 91px; position: absolute; width: 67px" text="Cerrar"/>
                        <ui:alert binding="#{disenoBalance.alert1}" id="alert1" style="left: 358px; top: 50px; position: absolute"/>
                        <ui:hiddenField binding="#{disenoBalance.hiddenField1}" id="hiddenField1" immediate="true"/>
                        <ui:staticText binding="#{disenoBalance.stxtInfo}" id="stxtInfo" style="left: 729px; top: 82px; position: absolute" text="N" visible="false"/>
                        <ui:staticText binding="#{disenoBalance.stxtCodigoDseno}" id="stxtCodigoDseno" style="left: 729px; top: 58px; position: absolute" visible="false"/>
                        <ui:panelGroup binding="#{disenoBalance.groupPanel2}" id="groupPanel2" style="left: 120px; top: 126px; position: absolute">
                            <ui:panelLayout binding="#{disenoBalance.layoutPanel1}" id="layoutPanel1" panelLayout="flow" style="width: 719px" visible="false">
                                <h:panelGrid binding="#{disenoBalance.gridPanel1}" columns="3" id="gridPanel1" style="border-width: 1px; border-style: solid; border-color: rgb(204, 204, 204) rgb(204, 204, 204) rgb(204, 204, 204) rgb(204, 204, 204); ">
                                    <ui:label binding="#{disenoBalance.label6}" id="label6" text="Codigo:"/>
                                    <ui:textField binding="#{disenoBalance.txtCodigo}" id="txtCodigo" onChange="" onKeyUp="espacios(this, event)"/>
                                    <ui:message binding="#{disenoBalance.message2}" for="txtCodigo" id="message2" showDetail="false" showSummary="true"/>
                                    <ui:label binding="#{disenoBalance.label3}" for="dropDownProducto" id="label3" text="Producto:"/>
                                    <ui:dropDown binding="#{disenoBalance.dropDownProducto}" id="dropDownProducto"
                                        items="#{disenoBalance.sct0004DataProvider.options['SCT0004.CDGOPRDCTO,SCT0004.DSCRPCION']}"
                                        onChange="common_timeoutSubmitForm(this.form, 'gridPanel1:dropDownProducto');" style="width: 230px" valueChangeListener="#{disenoBalance.dropDownProducto_processValueChange}"/>
                                    <ui:staticText binding="#{disenoBalance.staticText1}" id="staticText1"/>
                                    <ui:label binding="#{disenoBalance.label4}" for="dropDownSublinea" id="label4" text="Sublinea:"/>
                                    <ui:dropDown binding="#{disenoBalance.dropDownSublinea}" id="dropDownSublinea"
                                        items="#{disenoBalance.sct0019DataProvider.options['SCT0019.CDGOSBLNEA,SCT0019.DSCRPCIONSBLNEA']}"
                                        onChange="common_timeoutSubmitForm(this.form, 'gridPanel1:dropDownSublinea');" style="width: 229px" valueChangeListener="#{disenoBalance.dropDownSublinea_processValueChange}"/>
                                    <ui:staticText binding="#{disenoBalance.staticText2}" id="staticText2"/>
                                    <ui:label binding="#{disenoBalance.label5}" for="dropDownTipoSolic" id="label5" text="Tipo de Solicitud:"/>
                                    <ui:dropDown binding="#{disenoBalance.dropDownTipoSolic}" id="dropDownTipoSolic"
                                        items="#{disenoBalance.sct0021DataProvider.options['SCT0021.CDGOTPOSLCTUD,SCT0021.DSCRPCIONTPOSLCTUD']}"
                                        onChange="common_timeoutSubmitForm(this.form, 'gridPanel1:dropDownTipoSolic');" style="width: 229px"/>
                                    <ui:staticText binding="#{disenoBalance.staticText8}" id="staticText8"/>
                                    <ui:label binding="#{disenoBalance.label7}" id="label7" text="Activo:"/>
                                    <ui:radioButtonGroup binding="#{disenoBalance.radioButtonGroup1}" columns="2" id="radioButtonGroup1"
                                        items="#{disenoBalance.radioButtonGroup1DefaultOptions.options}"
                                        selected="#{disenoBalance.radioButtonGroup1DefaultOptions.selectedValue}" style="width: 129px"/>
                                </h:panelGrid>
                                <h:panelGrid binding="#{disenoBalance.gridPanel2}" columns="2" id="gridPanel2" style="height: 38px" width="167">
                                    <ui:button action="#{disenoBalance.btnGuardar_action}" binding="#{disenoBalance.btnGuardar}" id="btnGuardar" mini="true"
                                        primary="true" style="width: 70px" text="Guardar"/>
                                    <ui:button action="#{disenoBalance.btnCancelar_action}" binding="#{disenoBalance.btnCancelar}" id="btnCancelar"
                                        immediate="true" mini="true" onClick="if(!confirm('¿Seguro que desea cancelar la operación?')){return false}"
                                        primary="true" style="width: 64px" text="Cancelar"/>
                                </h:panelGrid>
                            </ui:panelLayout>
                            <ui:table augmentTitle="false" binding="#{disenoBalance.table1}" deselectMultipleButton="true" id="table1" paginateButton="true"
                                paginationControls="true" selectMultipleButton="true" style="width: 720px" title="Diseños" width="720">
                                <script><![CDATA[
                                function espacios(campo, event){ // evitar espacios en blancos
                                cadenaReemplazar= " ";
                                valorReemplazo="";
                                cadena = campo.value;
                                cadenaNueva = cadena.split(cadenaReemplazar).join(valorReemplazo);
                                campo.value = cadenaNueva;                                
                                }
                                
                                function busqueda(valor){ // para buscar el diseño
                                var campo= document.getElementById('form1:hiddenField1');                                 
                                if(valor!=null){                                    
                                campo.value=valor;                                         
                                }
                                }
                                /* ----- Functions for Table Preferences Panel ----- */
                                /*
                                * Toggle the table preferences panel open or closed
                                */
                                function togglePreferencesPanel() {
                                var table = document.getElementById("form1:table1");
                                table.toggleTblePreferencesPanel();
                                }
                                /* ----- Functions for Filter Panel ----- */
                                /*
                                * Return true if the filter menu has actually changed,
                                * so the corresponding event should be allowed to continue.
                                */
                                function filterMenuChanged() {
                                var table = document.getElementById("form1:table1");
                                return table.filterMenuChanged();
                                }
                                /*
                                * Toggle the custom filter panel (if any) open or closed.
                                */
                                function toggleFilterPanel() {
                                var table = document.getElementById("form1:table1");
                                return table.toggleTableFilterPanel();
                                }
                                /* ----- Functions for Table Actions ----- */
                                /*
                                * Initialize all rows of the table when the state
                                * of selected rows changes.
                                */
                                function initAllRows() {
                                var table = document.getElementById("form1:table1");
                                table.initAllRows();
                                }
                                /*
                                * Set the selected state for the given row groups
                                * displayed in the table.  This functionality requires
                                * the 'selectId' of the tableColumn to be set.
                                *
                                * @param rowGroupId HTML element id of the tableRowGroup component
                                * @param selected Flag indicating whether components should be selected
                                */
                                function selectGroupRows(rowGroupId, selected) {
                                var table = document.getElementById("form1:table1");
                                table.selectGroupRows(rowGroupId, selected);
                                }
                                /*
                                * Disable all table actions if no rows have been selected.
                                */
                                function disableActions() {
                                // Determine whether any rows are currently selected
                                var table = document.getElementById("form1:table1");
                                var disabled = (table.getAllSelectedRowsCount() > 0) ? false : true;
                                // Set disabled state for top actions
                                document.getElementById("form1:table1:tableActionsTop:deleteTop").setDisabled(disabled);
                                // Set disabled state for bottom actions
                                document.getElementById("form1:table1:tableActionsBottom:deleteBottom").setDisabled(disabled);
                                }]]></script>
                                <ui:tableRowGroup binding="#{disenoBalance.tableRowGroup1}" emptyDataMsg="Sin registros" id="tableRowGroup1" rows="10"
                                    selected="#{disenoBalance.selectedState}" sourceData="#{disenoBalance.sct0076DataProvider1}" sourceVar="currentRow">
                                    <ui:tableColumn align="center" binding="#{disenoBalance.tableColumn6}" id="tableColumn6"
                                        onClick="setTimeout('initAllRows()',0)" selectId="checkbox1" valign="middle">
                                        <ui:checkbox binding="#{disenoBalance.checkbox1}" id="checkbox1" name="checkbox1" selected="#{disenoBalance.selected}" selectedValue="#{disenoBalance.selectedValue}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{disenoBalance.tableColumn1}" headerText="Codigo" id="tableColumn1" sort="SCT0076.CDGODSNO">
                                        <ui:staticText binding="#{disenoBalance.staticText3}" id="staticText3" text="#{currentRow.value['SCT0076.CDGODSNO']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{disenoBalance.tableColumn2}" headerText="Activo" id="tableColumn2" sort="SCT0076.ACTVO">
                                        <ui:staticText binding="#{disenoBalance.staticText4}" id="staticText4" text="#{disenoBalance.activo}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{disenoBalance.tableColumn3}" headerText="Producto" id="tableColumn3" sort="SCT0004.DSCRPCION">
                                        <ui:staticText binding="#{disenoBalance.staticText5}" id="staticText5" text="#{currentRow.value['SCT0004.DSCRPCION']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{disenoBalance.tableColumn4}" headerText="Sublinea" id="tableColumn4" sort="SCT0019.DSCRPCIONSBLNEA">
                                        <ui:staticText binding="#{disenoBalance.staticText6}" id="staticText6" text="#{currentRow.value['SCT0019.DSCRPCIONSBLNEA']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{disenoBalance.tableColumn5}" headerText="Tipo de Solicitud" id="tableColumn5" sort="SCT0021.DSCRPCIONTPOSLCTUD">
                                        <ui:staticText binding="#{disenoBalance.staticText7}" id="staticText7" text="#{currentRow.value['SCT0021.DSCRPCIONTPOSLCTUD']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn align="center" binding="#{disenoBalance.tableColumn7}" headerText="Variables" id="tableColumn7" valign="middle">
                                        <ui:hyperlink action="#{disenoBalance.hyperlink1_action}" binding="#{disenoBalance.hyperlink1}" id="hyperlink1"
                                            immediate="true" text="#{disenoBalance.opcion}"/>
                                    </ui:tableColumn>
                                </ui:tableRowGroup>
                                <f:facet name="actionsTop">
                                    <ui:panelGroup binding="#{disenoBalance.groupPanel1}" id="groupPanel1" style="left: 24px; top: 312px">
                                        <ui:button action="#{disenoBalance.btnModificar_action}" binding="#{disenoBalance.btnModificar}" id="btnModificar"
                                            mini="true" onClick="getElementById('form1:txtCodigo').value='.';" primary="true" style="width: 61px" text="Modificar"/>
                                        <ui:button action="#{disenoBalance.btnBuscar_action}" binding="#{disenoBalance.btnBuscar}" id="btnBuscar"
                                            immediate="true" mini="true"
                                            onClick="var resp = prompt('Escriba el codigo del diseño que desea buscar\nDeje en blanco para eliminar el filtro.'); if(resp==null){return false}else{busqueda(resp)}"
                                            primary="true" style="width: 51px" text="Buscar"/>
                                        <ui:button action="#{disenoBalance.btnActivarDesc_action}" binding="#{disenoBalance.btnActivarDesc}" id="btnActivarDesc"
                                            mini="true" primary="true" style="width: 106px" text="Activar / Desactivar"/>
                                        <ui:button action="#{disenoBalance.button1_action}" binding="#{disenoBalance.button1}" id="button1" mini="true" text="Generar reporte &gt;"/>
                                    </ui:panelGroup>
                                </f:facet>
                                <f:facet name="actionsBottom">
                                    <ui:button action="#{disenoBalance.btnEliminar_action}" binding="#{disenoBalance.btnEliminar}" id="btnEliminar" mini="true"
                                        onClick="if(!confirm('¿Seguro que desea eliminar los diseños seleccionados?'))return false;"
                                        style="left: 24px; top: 360px; width: 61px" text="Eliminar"/>
                                </f:facet>
                            </ui:table>
                        </ui:panelGroup>
                        <ui:button action="#{disenoBalance.btnNuevo_action}" binding="#{disenoBalance.btnNuevo}" id="btnNuevo" immediate="true" mini="true"
                            primary="true" style="left: 213px; top: 91px; position: absolute; width: 61px" text="Nuevo &gt;"/>
                    </ui:form>
                </ui:body>
            </ui:html>
        </ui:page>
    </f:view>
</jsp:root>
